home *** CD-ROM | disk | FTP | other *** search
/ Celebration Sounds / Celebration Sounds.iso / pc / startup / startup.dir / Lingo_2_rollovers.ls < prev    next >
Encoding:
Text File  |  1997-11-07  |  2.9 KB  |  79 lines

  1. on hCheckRollover pMouseCast, pRollover
  2.   if pMouseCast > 0 then
  3.     set tMemberName to the name of member pMouseCast
  4.     set tRolloverName to the name of member the memberNum of sprite pRollover of castLib the castLibNum of sprite pRollover
  5.     if tMemberName <> tRolloverName then
  6.       set tMemberName to EMPTY
  7.     end if
  8.   else
  9.     set tMemberName to EMPTY
  10.   end if
  11.   case word 2 of tMemberName of
  12.     "upState":
  13.       hDoButtonRollover(tMemberName, pRollover)
  14.       hChangeCursor("finger cursor")
  15.       if the windowList <> [] then
  16.         repeat while rollOver(pRollover) = 1
  17.           if the mouseDown = 1 then
  18.             exit repeat
  19.           end if
  20.           updateStage()
  21.         end repeat
  22.       end if
  23.     "rolloverState":
  24.       nothing()
  25.     otherwise:
  26.       hUndoButtonRollover()
  27.       hChangeCursor("arrow")
  28.   end case
  29.   updateStage()
  30. end
  31.  
  32. on hDoButtonRollover pMemberName, pRollover
  33.   global gsRolloverButton, gsDescriptionText
  34.   hUndoButtonRollover()
  35.   set tsButton to pRollover
  36.   set tNextButtonState to word 2 of the name of member (the memberNum of sprite tsButton + 1) of castLib the castLibNum of sprite tsButton
  37.   if tNextButtonState = "rolloverState" then
  38.     puppetSprite(tsButton, 1)
  39.     set the memberNum of sprite tsButton to the memberNum of sprite tsButton + 1
  40.     set gsRolloverButton to tsButton
  41.     set tSelection to word 1 of the name of member the memberNum of sprite tsButton of castLib the castLibNum of sprite tsButton
  42.     case tSelection of
  43.       "install":
  44.         if (the machineType = 256) and (the platform = "Windows,16") then
  45.           set tSelection to "installWinQT16 description"
  46.         else
  47.           if (the machineType = 256) and (the platform = "Windows,32") then
  48.             set tSelection to "installWinQT32 description"
  49.           else
  50.             set tSelection to "installMacQT description"
  51.           end if
  52.         end if
  53.         set tmDescriptionText to the number of member tSelection
  54.       "run", "quit":
  55.         set tmDescriptionText to the number of member (tSelection && "description")
  56.     end case
  57.     puppetSprite(gsDescriptionText, 1)
  58.     set the memberNum of sprite gsDescriptionText to tmDescriptionText
  59.   end if
  60. end
  61.  
  62. on hUndoButtonRollover
  63.   global gsRolloverButton, gsDescriptionText
  64.   if voidp(gsRolloverButton) = 1 then
  65.     set gsRolloverButton to EMPTY
  66.   else
  67.     if gsRolloverButton <> EMPTY then
  68.       set tmDescriptionText to the number of member "blank description"
  69.       set the memberNum of sprite gsDescriptionText to tmDescriptionText
  70.       puppetSprite(gsDescription, 0)
  71.       set tmName to word 1 of the name of member the memberNum of sprite gsRolloverButton of castLib the castLibNum of sprite gsRolloverButton
  72.       set tmNum to the number of member (tmName && "upState")
  73.       set the memberNum of sprite gsRolloverButton to tmNum
  74.       puppetSprite(gsRolloverButton, 0)
  75.       set gsRolloverButton to EMPTY
  76.     end if
  77.   end if
  78. end
  79.